/**
* @author Cheng Liu
**/

#pragma once

class IEventHandler;
class CMenu;
typedef struct _BHND{}*BHND;
typedef struct _BVHND {}*BVHND;

class IPluginFacade {
public:
	virtual ~IPluginFacade(){}

	virtual void AttachListener(const Events::EventType& type, IEventHandler* handler) = 0;
	virtual bool DettachListener(const Events::EventType& type, IEventHandler* handler) = 0;
	virtual void ReleaseListener(const IEventHandler* handler) = 0;
	virtual void PublishEvent(Events::Event* event) = 0;

	virtual UINT RegisterCommand(IEventHandler* eventHandler) = 0;
	virtual void ReleaseCommand(UINT nCmd) = 0;

	virtual CMenu& GetMainMenu() = 0;
	virtual CMenu& GetFileMenu() = 0;
	virtual CMenu& GetEditMenu() = 0;
	virtual CMenu& GetViewMenu() = 0;
	virtual CMenu& GetWindowMenu() = 0;
	virtual CMenu& GetHelpMenu() = 0;

	virtual BVHND GetActiveTextView() = 0;
	virtual void SetTextView(BVHND textView , BHND bhnd) = 0;
	virtual void SetFocus(BVHND view) = 0;
	virtual std::basic_string<TCHAR> GetTextBufferName(BHND bhnd) = 0;
	virtual std::vector<BHND> GetTextBufferList() = 0;
	virtual BHND OpenTextBuffer(std::basic_string<TCHAR> pathFileName) = 0;
	virtual BOOL RegisterAccelKey(char* filePath, char* str, int cmd) = 0;
	//virtual void SetColor(BVHND view, UINT color, int start, int length) = 0;
};
